package com.flower.enjoyment.flower.mapper;

import com.flower.enjoyment.flower.entity.UserAssess;
import com.flower.enjoyment.flower.entityDo.UserAssessDo;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserAssessMapper {
    int deleteByPrimaryKey(String id);

    int insert(UserAssess record);

    int insertSelective(UserAssess record);

    UserAssessDo selectByPrimaryKey(@Param("id") String id);

    int updateByPrimaryKeySelective(UserAssess record);

    int updateByPrimaryKey(UserAssess record);

    /**
     * 获取首页评论信息
     * @return
     */
    public List<UserAssessDo> selectUserAssessListByHome(@Param("userId") String userId);

    List<UserAssessDo> selectAssessDetailById(@Param("assessId") String assessId);

    /**
     * 我的评论
     * @param userId
     * @return
     */
    public Page<UserAssessDo> selectUserAssessListUserIdByPage(@Param("userId") String userId);

    /**
     * 大家说
     * @param userId
     * @param shopId
     * @return
     */
    public Page<UserAssessDo> selectEveryBodySayListByPage(@Param("userId") String userId,@Param("shopId") String shopId);

    UserAssessDo selectDetailByUserAndAssessId(@Param("userId") String userId,@Param("assessId") String assessId);

}